use strict;
use warnings;
use Test::More tests => 2;

use File::Basename;

use MT::App::Test;

SKIP: {
	eval { require DBD::Pg };
	skip "requiring DBD::Pg", 2 if $@;

	my $app = undef;
	ok(
		$app = MT::App::Test->test_instance_of(
			force_initialize_database => 1,
			'mt-config.cgi' => File::Spec->catfile(
				dirname(File::Spec->rel2abs(__FILE__)),
				'mt-config-postgres.cgi',
			),
			data_dirs => dirname(File::Spec->rel2abs(__FILE__)),
		),
		'fetching instance with postgres database'
	);

	isa_ok($app, 'MT::App::CMS');
}
